package com.example.myCommandLineRunner;

/**
 * Created by Administrator on 2017/1/10 0010.
 * 服务启动执行
 */

import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.util.Arrays;

@Component
@Order(value=1)
public class MyCmdStartupRunner2 implements CommandLineRunner {

    @Override
    public void run(String... args) throws Exception {
        //就是一个String类型的可变长度的数组,固定长度的数组是String[] str={};这样写,可变的就String... str.

        System.out.println(Arrays.asList(args));
        System.out.println(">>>>>>>>>>>>>>>服务启动执行，执行加载数据等操作 222 <<<<<<<<<<<<<");
    }

}